package com.bosssoft.cloud.wechat.core.bean.param.portal;

import com.alibaba.fastjson.annotation.JSONField;
import com.bosssoft.cloud.wechat.core.bean.WxBaseMsg;
import com.bosssoft.cloud.wechat.infrastructure.constant.WxKeywordConsts;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 回复文本消息
 * <p>
 * 详细请参考官方文档：
 * https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html
 *
 * @author wcy create on 2021/5/27 11:53 上午
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class TextParam extends WxBaseMsg {

    /**
     * 文本消息内容
     */
    @JSONField(name = "Content")
    private String content;

    /**
     * 消息id，64位整型
     */
    @JSONField(name = "MsgId")
    private String msgId;


    public TextParam(String toUserName, String fromUserName) {
        super(toUserName, fromUserName, String.valueOf(System.currentTimeMillis() / 1000), WxKeywordConsts.MsgType.TEXT);
    }


}
